package src;

import javax.swing.*;
import java.awt.*;

import static java.awt.BorderLayout.*;

/**
 * Created by dell on 2017/8/2.
 */
public class BoardTest {
    public static void main(String[] args) {
        Frame jf=new JFrame("测试窗口");
        jf.setLayout(new BorderLayout(30,5));

        jf.add(new Button("南"),SOUTH);
        jf.add(new Button("西"),WEST);
        jf.add(new Button("北"),NORTH);
        Panel p=new Panel();
        p.add(new TextField(20));
        p.add(new Button("单击我"));
        jf.add(p);
        jf.add(new Button("东"),EAST);
        //jf.add(new Button("中"));
        jf.pack();
        jf.setVisible(true);
    }
}
